package com.foreverwin.mes.meapi.service;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.IService;
import com.foreverwin.mes.core.base.FrontPage;
import com.foreverwin.mes.core.exception.BusinessException;
import com.foreverwin.mes.meapi.dto.GenerateNextNumberRequest;
import com.foreverwin.mes.meapi.dto.GenerateNextNumberResponse;
import com.foreverwin.mes.meapi.model.NextNumber;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author syngna
 * @since 2019-01-10
 */
public interface NextNumberService extends IService<NextNumber> {

    /**
     *  分页查询
     * @param frontPage
     * @return
     */
    Page<NextNumber> selectPage(FrontPage<NextNumber> frontPage);

    List<NextNumber> selectList();

    NextNumber selectByIdForUpdate(String handle);

    GenerateNextNumberResponse generateNextValues(GenerateNextNumberRequest request) throws BusinessException;
}